<script type="text/javascript">
    $(function(){
        $("input[name=keywordOrder]").focus().select();
        $('#point').val('<?=$point?>');
        $('#statusId').val('<?=$statusId?>');
        $('#client_id').val('<?=$client_id?>');
        $('#manager_id').val('<?=$manager_id?>');
        $("select[data-edit-select]").filterSelect();
    });
</script>


<!--菜单 start-->
<?php $this->load->view('defaults/common/left');?>
<!--菜单 end-->
<div id="content">
  <div class="page-header">
    <div class="container-fluid">
      <h1><?=lang('menu_timeout_order')?></h1>
      <?=$this->breadcrumb->generateHTML();?>
    </div>
  </div>
  <div class="container-fluid">
    <div class="panel panel-default">
      <div class="panel-heading">
        <h3 class="panel-title"><i class="fa fa-list"></i><?=lang('menu_timeout_order')?></h3>
      </div>
      <div class="panel-body">
        <div class="well" style="padding:0 19px;">
          <div class="row">
             <form action="<?=blang_url('orders/MyOrder/timeoutOrder')?>" method="post" name="searchform" >
                <div class="col-sm-4">
                    <div class="form-group">
                        <label class="control-label">keyword</label>
                        <input class="form-control" name="keyword" value="<?=$keyword?>" size="30" placeholder="orderID/source_oid/productSku/IMEI" />
                    </div>
                    <div class="form-group">
                        <label class="control-label">status</label>
                        <select class="form-control" name="status_id" id="statusId">
                            <option value="">--<?=lang('public_qxz')?>--</option>
                            <?php foreach ($statusList as $rs):?>
                             <option value="<?=$rs['id']?>" <?=$optStatus[$rs['id']]?> > <?=$rs['name_'.$curLang]?> </option>
                            <?php endforeach;?>
                        </select>
                    </div>
                </div>
                <div class="col-sm-4">
                    <div class="form-group">
                        <label class="control-label">service center</label>
                        <select class="form-control" name="point" id="point">
                            <option value="">--<?=lang('public_qxz')?>--</option>
                            <?php foreach ($pointList as $pt):?>
                            <option value="<?=$pt['point']?>"> <?=$pt['point']?> </option>
                            <?php endforeach;?>
                        </select>
                    </div>
                    <div class="form-group">
                        <label class="control-label">Customers</label>
                        <select class="form-control" name="client_id" id="client_id" data-edit-select="1">
                            <option value="">--<?=lang('public_qxz')?>--</option>
                            <?php foreach($customersList as $cl){?>
                                <option value="<?=$cl['id']?>"><?=$cl['name']?></option>
                            <?php }?>
                        </select>
                    </div>
                </div>
                <div class="col-sm-4"> 
                    <div class="form-group">
                        <label class="control-label">salesman</label>
                        <select class="form-control" name="manager_id" id="manager_id">
                            <option value="">-salesman-</option>
                            <option value="38">王继宏</option>
                            <?php foreach($salesList as $row){?>
                                <option value="<?=$row['id']?>"><?=$row['name']?></option>
                            <?php }?>
                        </select>
                    </div>
                    <input class="btn btn-primary pull-right" style="margin: 0 0 10px 10px;" type="submit" name="searchSubmit" value="<?=lang('public_cx')?> " />
                    <a href="<?=blang_url('orders/MyOrder/timeoutOrder'.$str.'&export=1')?>" class="btn btn-oms pull-right" style="margin-left: 10px;"><i class="fa fa-download"></i>&nbsp;<?=lang('public_dcsj')?></a>
                    <label class="pull-right" style="color:#1e91cf;margin-top: 10px;">Total:<?=$show_params?></label>
                </div>
                <div class="col-sm-12">
                    <div class="form-group oms-group">
                        <a class="btn btn-oms" href="<?=blang_url('orders/MyOrder/timeoutOrder?status_id=1')?>"><?=lang('tm_shcs')?></a>
                        <a class="btn btn-oms" href="<?=blang_url('orders/MyOrder/timeoutOrder?status_id=18')?>"><?=lang('tm_cbcs')?></a>
                        <a class="btn btn-oms" href="<?=blang_url('orders/MyOrder/timeoutOrder?status_id=2')?>"><?=lang('tm_bjcs')?></a>
                        <a class="btn btn-oms" href="<?=blang_url('orders/MyOrder/timeoutOrder?status_id=5')?>"><?=lang('tm_qrcs')?></a>
                        <a class="btn btn-oms" href="<?=blang_url('orders/MyOrder/timeoutOrder?status_id=6or7')?>"><?=lang('tm_wxcs')?></a>
                        <a class="btn btn-oms" href="<?=blang_url('orders/MyOrder/timeoutOrder?status_id=13or17')?>"><?=lang('tm_fhcs')?></a>
                    </div>
                </div>
            </form>
          </div>
        </div>
          <div class="table-responsive">
            <table class="table table-bordered table-hover oms-table">
              <thead>
                <tr>
                  <td class="text-left"><?=lang('order_wxdh')?></td>
                  <td class="text-left"><?=lang('order_lydh')?></td>
                  <td class="text-left">type</td>
                  <td class="text-left">category</td>
                  <td class="text-left"><?=lang('public_zt')?></td>
                  <td class="text-right">sku</td>
                  <td class="text-right">imei</td>
                  <td class="text-right"><?=lang('order_clr')?></td>
                  <td class="text-right"><?=lang('order_rq')?></td>
                </tr>
              </thead>
              <tbody>
                <?php if($orderList): foreach ($orderList as $key=>$rs):?>
                <tr>
                    <td class="text-left">
                        <a href="<?=blang_url('orders/Order_new/inDetails/'.$rs['oid'])?>" style="color: <?=$rs['holdColorOrder']?>"><?=$rs['order_num']?></a>
                        <a class="btn btn-primary btn-xs pull-right" href="<?=blang_url('orders/Order_new/edit/'.$rs['oid'])?>" title="edit" ><i class="fa fa-edit"></i></a>
                    </td>
                    <td class="text-left"><?=$rs['source_oid']?></td>
                    <td class="text-left"><?=$rs['serviceName']?></td>
                    <td class="text-left"><?=$rs['categoryName']?></td>
                    <td class="text-left"><?=$rs['statusName']?></td>
                    <td class="text-right"><?=$rs['productSku']?></td>
                    <td class="text-right"><?=$rs['imei']?></td>
                    <td class="text-right"><?=$rs['add_user']?></td>
                    <td class="text-right"><?=$rs['add_time']?></td>
                </tr>
                <?php endforeach; else:?>
                    <tr><td colspan="9" class="emptyNumber"><?=lang('public_mygdsj')?>....</td></tr>
                <?php endif; ?>
            </tbody>
            </table>
            <?php if($show_pages):?>
            <div class="page">
                <?=$show_pages?>
            </div>
            <?php endif;?>
          </div>
      </div>
    </div>
    </div>
</div>




